package com.miplus.ccrm.core.service.strategy;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.miplus.ccrm.core.controller.vo.strategy.ActOGrpLinkReqVo;
import com.miplus.ccrm.core.controller.vo.strategy.ActOGrpLinkResVo;
import com.miplus.ccrm.core.pojo.CfgActivityOthergrplink;
import com.miplus.ccrm.core.mapper.CfgActivityOthergrplinkMapper;
import org.springframework.stereotype.Service;

/**
* @author pc
* @description 针对表【cfg_activity_othergrplink】的数据库操作Service实现
* @createDate 2024-03-22 18:57:14
*/
@Service
public class CfgActivityOthergrplinkServiceImpl extends MPJBaseServiceImpl<CfgActivityOthergrplinkMapper, CfgActivityOthergrplink>
    implements CfgActivityOthergrplinkService{

    @Override
    public IPage<ActOGrpLinkResVo> activityOutGrpList(ActOGrpLinkReqVo paras){
        return selectJoinListPage(new Page<>(paras.getPageNum(), paras.getPageSize()),
                ActOGrpLinkResVo.class,
                new MPJLambdaWrapper<CfgActivityOthergrplink>()
                        .selectAs("g.grpname",ActOGrpLinkResVo::getGrpname)
                        .leftJoin("sys_grp g on g.grpid=t.grpid")
                        .selectAll(CfgActivityOthergrplink.class)
                        .eq("activityid",paras.getActivityid())
        );
    }
}




